import { axios } from '@/utils/request'

/**
 * 查询物料BOM
 *
 * @author Eric
 * @date 2021-05-12 10:39:34
 */
export function materialBomPage (parameter) {
  return axios({
    url: '/materialBom/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 物料BOM列表
 *
 * @author Eric
 * @date 2021-05-12 10:39:34
 */
export function materialBomList (parameter) {
  return axios({
    url: '/materialBom/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加物料BOM
 *
 * @author Eric
 * @date 2021-05-12 10:39:34
 */
export function materialBomAdd (parameter) {
  return axios({
    url: '/materialBom/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑物料BOM
 *
 * @author Eric
 * @date 2021-05-12 10:39:34
 */
export function materialBomEdit (parameter) {
  return axios({
    url: '/materialBom/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除物料BOM
 *
 * @author Eric
 * @date 2021-05-12 10:39:34
 */
export function materialBomDelete (parameter) {
  return axios({
    url: '/materialBom/delete',
    method: 'post',
    data: parameter
  })
}

/**
 * 查询版本清单
 *
 * @author Eric
 * @date 2021-04-04 08:55:37
 */
 export function listVersion (code) {
  return axios({
    url: '/materialBom/listVersion',
    method: 'get',
    params: { materialCode: code }
  })
}

/**
 * 查询BOM详情
 *
 * @author Eric
 * @date 2021-05-12 10:39:34
 */
export function materialBomDetail (code) {
  return axios({
    url: '/materialBom/detail',
    method: 'get',
    params: { bomCode: code }
  })
}
